<!doctype html> 
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-touch-fullscreen" content="yes" />
<meta name="format-detection" content="telephone=no"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="format-detection" content="telephone=no" />
<meta name="msapplication-tap-highlight" content="no" />
<meta name="viewport" content="initial-scale=1,maximum-scale=1,minimum-scale=1" />
<title>兑换记录</title>
<link rel="stylesheet" type="text/css" href="../../css/base.css">
<link rel="stylesheet" type="text/css" href="../../css/nctouch_member.css">
<link rel="stylesheet" type="text/css" href="../../css/nctouch_common.css">
<link rel="stylesheet" type="text/css" href="../../css/nctouch_cart.css">
</head>
<body>
<header id="header" class="fixed">
  <div class="header-wrap">
    <div class="header-l"><a href="member.html"><i class="back"></i></a></div>

	<div class="header-title">
      <h1>兑换记录</h1>
    </div>
    <div class="header-r"> <a id="header-nav" href="javascript:void(0);"><i class="more"></i><sup></sup></a> </div>
  </div>
  <div class="nctouch-nav-layout">
    <div class="nctouch-nav-menu"> <span class="arrow"></span>
      <ul>
        <li><a href="../../index.html"><i class="home"></i>首页</a></li>
        <li><a href="../search.html"><i class="search"></i>搜索</a></li>
        <li><a href="../product_first_categroy.html"><i class="categroy"></i>分类</a></li>
        <li><a href="javascript:void(0);"><i class="message"></i>消息</a></li>
        <li><a href="../cart_list.html"><i class="cart"></i>购物车<sup></sup></a></li>
        <li><a href="../member/member.html"><i class="member"></i>我的商城</a></li>
      </ul>
    </div>
  </div>
</header>
<div class="nctouch-main-layout">
  <!--div class="nctouch-order-search">
    <form>
      <span><input type="text" autocomplete="on" maxlength="50" placeholder="输入商品标题或订单号进行搜索" name="order_key" id="order_key" oninput="writeClear($(this));" >
      <span class="input-del"></span></span>
      <input type="button" id="search_btn" value="&nbsp;">
    </form>
  </div-->
 
  <div class="nctouch-order-list">
    <ul id="order-list">
    </ul>
  </div>

</div>
<div class="fix-block-r">
	<a href="javascript:void(0);" class="gotop-btn gotop hide" id="goTopBtn"><i></i></a>
</div>
<footer id="footer" class="bottom"></footer>
<script type="text/html" id="order-list-tmpl">
<% var order_list = datas.order_list; %>
<% if (order_list.length > 0){%>
	<% for(var i = 0;i<order_list.length;i++){
		var order_goods = order_list[i].prodlist;
	%>
		<li class="<%if(order_list[i].point_allpoint){%>green-order-skin<%}else{%>gray-order-skin<%}%> <%if(i>0){%>mt10<%}%>">
			<% {
				
			%>
				<div class="nctouch-order-item">
					<div class="nctouch-order-item-head">
						
						<a class="store">
						<i class="icon"></i>兑换订单号:<%=order_list[i].point_ordersn%></a>
						
						<span class="state">
							<%
								var stateClass ="ot-finish";
								var orderstate = order_list[i].point_orderstate;
								if(orderstate == 20 || orderstate == 30 || orderstate == 40|| orderstate == 50){
									stateClass = stateClass;
								}else if(orderstate == 2) {
									stateClass = "ot-cancel";
								}else {
									stateClass = "ot-nofinish";
								}
							%>
							<span class="<%=stateClass%>"><%=order_list[i].state_desc%></span>
						</span>
					</div>
					<div class="nctouch-order-item-con">
						<%
							var count = 0;
							 for (k in order_goods){
								count += parseInt(order_goods[k].point_goodsnum);
						%>
						<div class="goods-block">
						<a href="<%=WapSiteUrl%>/tmpl/member/pointorder_view.html?order_id=<%=order_list[i].point_orderid%>">
							<div class="goods-pic">
								<img src="<%=order_goods[k].point_goodsimage%>"/>
							</div>
							<dl class="goods-info">
								<dt class="goods-name"><%=order_goods[k].point_goodsname%></dt>
								<dd class="goods-type"></dd>
							</dl>
							<div class="goods-subtotal">
								<span class="goods-price"><em><%=order_goods[k].point_goodspoints%></em>积分</span>
								<span class="goods-num">x<%=order_goods[k].point_goodsnum%></span>
							</div>
						</a>
						</div>
						<%}%>
					
					</div>
					<div class="nctouch-order-item-footer">
						<div class="store-totle">
							<span>共<em><%=count%></em>件商品，合计</span><span class="sum"><em><%=order_list[i].point_allpoint%></em>积分</span>
						</div>    
						<div class="handle">
							<%if(order_list[i].point_orderstate =='30' ){%>
							<a href="javascript:void(0)" order_id="<%=order_list[i].point_orderid%>" class="btn key sure-order">确认收货</a>
							<%}%>
							<%if(order_list[i].point_orderstate =='20'){%>
							<a href="javascript:void(0)" order_id="<%=order_list[i].point_orderid%>" class="btn cancel-order">取消兑换</a>
							<%}%>
							<a href="javascript:void(0)" order_id="<%=order_list[i].point_orderid%>" class="btn view-order">查看详情</a>
							
						
						</div>
					</div>
				</div>
			<%}%>
			
		</li>
	<%}%>
	<% if (hasmore) {%>
	<li class="loading"><div class="spinner"><i></i></div>订单数据读取中...</li>
	<% } %>
<%}else {%>
	<div class="nctouch-norecord order">
		<div class="norecord-ico"><i></i></div>
		<dl>
			<dt>您还没有相关的订单</dt>
			<dd>可以去看看哪些想要兑换的</dd>
		</dl>
		<a href="<%=WapSiteUrl%>/tmpl/pointspro_list.html" class="btn">随便逛逛</a>
	</div>
<%}%>
</script> 
<script type="text/javascript" src="../../js/zepto.min.js"></script> 
<script type="text/javascript" src="../../js/template.js"></script> 
<script type="text/javascript" src="../../js/config.js"></script> 
<script type="text/javascript" src="../../js/common.js"></script> 
<script type="text/javascript" src="../../js/simple-plugin.js"></script> 
<script type="text/javascript" src="../../js/zepto.waypoints.js"></script> 
<script type="text/javascript" src="../../js/tmpl/order_payment_common.js"></script> 
<script type="text/javascript" src="../../js/tmpl/pointorder_list.js"></script>
</body>
</html>
